package com.xing.service.user;

import com.xing.pojo.Role;
import com.xing.pojo.User;

import java.sql.SQLException;
import java.util.List;

public interface UserService {
    //用户登录
    public User login(String useCode,String pwd) throws SQLException, ClassNotFoundException;

    //根据用户Id修改密码
    public boolean updatePwd(int id ,String pwd) throws SQLException, ClassNotFoundException;

    //根据用户名或者角色查询用户总数
    public int getUserCount(String username,int userRole) throws SQLException, ClassNotFoundException;
    //查询用户列表
    public List<User> getUserList(String queryUsername, int queryUserRole, int currentPageNo, int pageSize) throws SQLException, ClassNotFoundException;

    //通过用户编码获取用户
    User getUserByUserCode(String userCode) throws SQLException, ClassNotFoundException;

    //通过用户Id查询用户
    User getUserById(int id) throws SQLException, ClassNotFoundException;

    //增加用户
    public int addUser(User user) throws SQLException, ClassNotFoundException;
    //删除用户
    public int delUser(int id) throws SQLException, ClassNotFoundException;
    //修改用户
    public int modifyUser(User user) throws SQLException, ClassNotFoundException;
}
